#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int factorial(int n)
{
	if (n > 1)
		return n * factorial(n - 1);
	else if (n == 1)
		return 1;
}
int main()
{
	int n, ret;
	scanf("%d", &n);
	ret=factorial(n);
	printf("%d", ret);
	return 0;
}